package com.example.datedemo.service.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("结果类")
public class ResponseResult {

    @ApiModelProperty(value = "状态码", example = "0")
    private Integer code; // 状态码，0失败，1成功

    @ApiModelProperty(value = "消息", example = "警告")
    private String message; // 消息

    @ApiModelProperty(value = "数据", example = "null")
    private Object data; // 数据

    public ResponseResult(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public ResponseResult(Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Object getData() {
        return data;
    }
}
